using UnityEngine;

namespace Crosstales.UI
{
    // [Assembly-CSharp-firstpass.dll].Crosstales.UI.UIDrag
    public class UIDrag : MonoBehaviour
    {
        // Fields
        private float offsetX;
        private float offsetY;
        private UnityEngine.Transform tf;
        
        // Methods
        private void Start()
        {
            this.tf = this.transform;
        }
        public void BeginDrag()
        {
            UnityEngine.Vector3 val_1 = this.tf.position;
            UnityEngine.Vector3 val_2 = UnityEngine.Input.mousePosition;
            val_2.x = val_1.x - val_2.x;
            this.offsetX = val_2.x;
            UnityEngine.Vector3 val_3 = UnityEngine.Input.mousePosition;
            this.offsetY = val_1.y - val_3.y;
        }
        public void OnDrag()
        {
            UnityEngine.Vector3 val_1 = UnityEngine.Input.mousePosition;
            UnityEngine.Vector3 val_2 = UnityEngine.Input.mousePosition;
            val_2.y = this.offsetY + val_2.y;
            this.tf.position = new UnityEngine.Vector3() {x = this.offsetX + val_1.x, y = val_2.y, z = 0f};
        }
        public UIDrag()
        {
        
        }
    
    }

}
